package com.ycdr.leetcode.queue.example;

/**
 * 优先级队列
 * 基于数组实现的优先级队列
 * @date 2020年06月02日
 * @author dingguangyi
 */
public class ArrayPriorityQueue {
    private int maxSize;
    private int nItems;
    private long[] queue;

    public ArrayPriorityQueue(int i){
        this.maxSize=i;
        this.nItems=0;
        this.queue=new long[i];
    }

    public boolean isEmpty(){
        return nItems==0;
    }

    public boolean isFull(){
        return nItems==maxSize;
    }
    public void insert(long i){
        if (isEmpty()){
            this.queue[nItems++]=i;
        }else {
            for (int j = nItems-1; j >0 ; j--) {
                if (queue[j]>i){

                }
            }
        }
    }
}

